package pms.contract.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import pms.contract.domain.BaseEntity;




@Table(name="user")
@Entity
public class User extends BaseEntity{
	
	private static final long serialVersionUID = -4376674977047164142L;
	@Column(name="ID")
	Long id;
	@Column(name="username")
	String username;
	@Column(name="password")
	String password;
	@Column(name="last_ip")
	String last_ip;
	@Column(name="credits")
	int credits;
	public Long getId() {
		return id;
	}
	public void setId(Long i) {
		this.id = i;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getLast_ip() {
		return last_ip;
	}
	public void setLast_ip(String last_ip) {
		this.last_ip = last_ip;
	}
	public int getCredits() {
		return credits;
	}
	public void setCredits(int credits) {
		this.credits = credits;
	}
	
	@ManyToOne
	@JoinColumn(name = "GROUP_ID")
	Group group;
	public Group getGroup() {
		return group;
	}

	public void setGroup(Group group) {
		this.group = group;
	}
}
